package cn.com.ieds.service;

import cn.com.ieds.dao.UserDao;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.sql.SQLException;

public class UserService {
    private UserDao userDao = new UserDao();

    public void loginAndSaveInfo(HttpServletRequest request, HttpServletResponse response) throws SQLException {
        userDao.loginAndSaveInfo(request, response);
    }

    public void getAllUserInfoAndRole(HttpServletRequest request, HttpServletResponse response) throws SQLException {
        userDao.getAllUserInfoAndRole(request, response);
    }

    public void addUser(HttpServletRequest request, HttpServletResponse response) throws SQLException {
        userDao.addUser(request, response);
    }

    public void delUser(HttpServletRequest request, HttpServletResponse response) throws SQLException {
        userDao.delUser(request, response);
    }

    public void updateUser(HttpServletRequest request, HttpServletResponse response) throws SQLException {
        userDao.updateUser(request,response);
    }

    public void getUserByRole(HttpServletRequest request, HttpServletResponse response) throws SQLException {
        userDao.getUserByRole(request, response);
    }
}
